package com.jltx.storage.downloader;


import java.util.List;

/**
 * @author jltxseo
 * Created by junlintianxia on 2019/12/03.
 */
public class MultiRequestResult {
    /**
     * 所有的下载任务个数
     */
    public final int count;

    /**
     * 下载任务
     */
    /**
     * 当前走过的总进度
     */
    public float curProgress;

    public final List<RequestResult> successList;

    public final List<RequestResult> failList;

    public final int status;
    public final Throwable error;

    public MultiRequestResult(int status, int count, float curProgress, List<RequestResult> successList, List<RequestResult> failList) {
        this.count = count;
        this.curProgress = curProgress;
        this.successList = successList;
        this.failList = failList;
        this.status = status;
        this.error = null;
    }

    public MultiRequestResult(int status, int count, float curProgress, List<RequestResult> successList, List<RequestResult> failList, Throwable error) {
        this.count = count;
        this.curProgress = curProgress;
        this.successList = successList;
        this.failList = failList;
        this.status = status;
        this.error = error;
    }

    public MultiRequestResult(int status, int count, float curProgress, Throwable error) {
        this(status, count, curProgress, null, null, error);
    }
}
